package com.sjq.demo.mapper;

import com.sjq.demo.entity.RbacPermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sjq.demo.service.RbacUserService;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 权限表 Mapper 接口
 * </p>
 *
 * @author yer
 * @since 2021-02-26
 */
public interface RbacPermissionMapper extends BaseMapper<RbacPermission> {

    @Select("select * from t_rbac_permission where id in (select permissionid from t_rbac_role_permission where roleid=#{roleid})")
    List<RbacPermission> getPermissionsByRoleId(@Param("roleid") String roleid);
}
